<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">


<ui:composition template="/template2.xhtml">
	<ui:define name="titulo">Cadastro de Motorista</ui:define>
	<ui:define name="barra_titulo">Cadastro de Motorista</ui:define>
	<ui:define name="corpo">
		<h:form>

			<p:panel header="Cadastro de Motorista" id="painel">
				<p:growl life="3000" />
				<h:panelGrid columns="2">
					<h:outputLabel value="Nome" />
					<p:inputText value="#{motoristaBean.motorista.nome}" />
					<h:outputLabel value="Endereço:" />
					<p:inputText value="#{motoristaBean.motorista.endereco}" />
					<h:outputLabel value="Cidade:" />
					<p:inputText value="#{motoristaBean.motorista.cidade}" />
					<h:outputLabel value=" UF:" />
					<p:inputText size="2" value="#{motoristaBean.motorista.uf}" />
					<h:outputLabel value="Telefone:" />
					<p:inputMask value="#{motoristaBean.motorista.telefone}" mask="(99) 9999-9999"/>
					<h:outputLabel value="CPF:" />
					<p:inputMask size="12" value="#{motoristaBean.motorista.cpf}" mask="999.999.999-99"/>
				</h:panelGrid>
			</p:panel>
			<br />
			<p:commandButton value="Cadastrar"
				actionListener="#{motoristaBean.salvar}" update="painel" />
		</h:form>
	</ui:define>
</ui:composition>
</html>
